﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyDashboard.aspx.cs" Inherits="MyVocationSpace.MyDashboard"
    Theme="Default" %>

<%@ Register Src="Header.ascx" TagName="header" TagPrefix="uc" %>
<%@ Register Src="Footer.ascx" TagName="footer" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>..:: MY VocationSpace ::..</title>
    <link href="css/Default.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <link href="css/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function SendConnectionReq(id, spnsentMsg, spanMYConnection, lnkConnectSend) {            //alert(id);
            var xmlhttp;
            if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
                xmlhttp = new XMLHttpRequest();
            }
            else {// code for IE6, IE5
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xmlhttp.onreadystatechange = function () {
                if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                    document.getElementById("loading").style.display = "none";
                    //document.getElementById(spnsentMsgTick).style.display = "block";
                    document.getElementById(spnsentMsg).innerHTML = "Connection request sent.";
                    document.getElementById(spanMYConnection).style.display = "none";
                    document.getElementById(lnkConnectSend).style.display = "none";

                    //spn.innerHTML = xmlhttp.responseText;
                    //spn.style.display = "block";
                    //emailAdd.value = "YOUR EMAIL ADDRESS";
                }
            }
            xmlhttp.open("POST", "AJAX/UserConnectRequestSend.aspx?IDConnect=" + id, true);
            xmlhttp.send();
            document.getElementById("loading").style.display = "block";

        }
        
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <center>
        <div>
            <uc:header ID="header" runat="server" />
        </div>
        <div id="content-wrapper">
            <center>
                <table>
                    <tr>
                        <td>
                            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upVocationMem">
                                <ProgressTemplate>
                                    <div id="pageLoading">
                                        <center>
                                            <img src="Images/loading123.gif" style="z-index: 5000; top: 50%; left: 50%; position: absolute;"
                                                alt="loading" />
                                            <div style="color: #1C6F93; font-size: 18px; top: 50%; left: 50%;">
                                                Loading...
                                            </div>
                                        </center>
                                        <div id="transparentBg" class="transparentBg">
                                        </div>
                                    </div>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                            <asp:UpdatePanel runat="server" ID="upVocationMem">
                                <ContentTemplate>
                                    <div class="Content">
                                        <div class="search-control">
                                            <div style="width: 285px; height: 33px;">
                                                <span style="vertical-align: middle;"><span style="width: 250px; font-family: Arial;
                                                    font-size: 13px; font-weight: bold; padding-right: 1px;">Industry:</span><span><asp:Label
                                                        ID="lblIndustryName" Font-Bold="true" ForeColor="Green" runat="server"></asp:Label></span>
                                                    <input type="hidden" id="hdnIDIndustry" runat="server" />
                                                </span>
                                            </div>
                                            <div style="width: 230px;">
                                                <span style="font-family: Arial; font-size: 13px; font-weight: bold;">Vocation:</span><span>
                                                    <asp:DropDownList ID="ddlVocation" SkinID="bigDrop" runat="server">
                                                    </asp:DropDownList>
                                                </span>
                                            </div>
                                            <div style="width: 150px;">
                                                <asp:DropDownList ID="ddlCountry" AutoPostBack="true" SkinID="bigDrop" runat="server"
                                                    OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                            <div>
                                                <asp:TextBox ID="txtsearchtopic" runat="server" MaxLength="50" onfocus="if(this.value=='Enter Topic Name')this.value='';this.style.color='#000';"
                                                    onblur="if(this.value=='')this.value='Enter Topic Name';this.style.color='#ccc';"
                                                    ForeColor="#cccccc" Text="Enter Topic Name"></asp:TextBox>
                                            </div>
                                            <div style="text-align: right; width: 70px;">
                                                <asp:Button ID="btnSubmitsearch" runat="server" Text="Search" CssClass="formBtnEdit"
                                                    OnClick="btnSubmitsearch_Click" />
                                            </div>
                                        </div>
                                        <div style="clear: both">
                                        </div>
                                        <div style="width: 980px;">
                                            <div class="user-dashboard">
                                                <div class="head" style="font-size: 16px">
                                                    Members of My Vocations
                                                </div>
                                                <%-- <asp:PlaceHolder ID="phMemebers" runat="server"></asp:PlaceHolder>--%>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <table>
                                                                <tr>
                                                                    <td style="width: 500px">
                                                                        <asp:DataList ID="dlMyVocationMember" RepeatDirection="Vertical" ShowFooter="false"
                                                                            runat="server" DataKeyField="IDUser" OnItemDataBound="dlMyVocationMember_ItemDataBound"
                                                                            OnPreRender="ShowFooter_OnPreRender">
                                                                            <ItemTemplate>
                                                                                <table width="485px" border="0" class="light-border">
                                                                                    <tr>
                                                                                        <td style="padding-right: 40px">
                                                                                            <img src='<%# Bind("Photo")%>' runat="server" id="imgPerson" width="60" height="60"
                                                                                                style="padding: 4px;" />
                                                                                        </td>
                                                                                        <td valign="top" align="left" style="width: 400px;">
                                                                                            <table>
                                                                                                <tr>
                                                                                                    <td align="left" style="font-size: 15px; font-family: Arial; font-weight: bold">
                                                                                                        <a href="ViewProfile.aspx?IDUser=<%#Eval("IDUser")%>"><span>
                                                                                                            <%#Eval("Firstname")%></span>&nbsp;<span><%#Eval("Lastname")%></span></a>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td style="font-size: 13px; font-family: Arial; color: #000">
                                                                                                        <%--<span style="padding: 0px 3px">at</span><span><%#Eval("Orgnization")%></span>--%>
                                                                                                        <%#Eval("Designation")%>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td style="font-size: 13px; font-family: Arial; color: Gray">
                                                                                                        <%#Eval("City")%><span>,</span><span style="padding-left: 3px"><%#Eval("CountryName")%></span>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" style="padding: 0px 40px 0px 4px; color: #1C6F93; width: 100px;">
                                                                                            <a href="Connections.aspx?IDUser=<%#Eval("IDUser")%>">
                                                                                                <asp:Label ID="lblConnection" runat="server"></asp:Label>
                                                                                            </a>
                                                                                        </td>
                                                                                        <td align="left">
                                                                                            <div id="divConnection" runat="server">
                                                                                                <div style="float: left;">
                                                                                                    <div id="divIdSendRequest" runat="server">
                                                                                                        <span id="spanMYConnection" runat="server">
                                                                                                            <img src="Images/plus1.jpg" id="imgPlus" runat="server" style="vertical-align: top"
                                                                                                                height="14" width="14" />
                                                                                                        </span><span style="vertical-align: top; margin-left: -4px; color: #006699; font-weight: bold;">
                                                                                                            <asp:LinkButton ID="lnkConnectSend" ForeColor="#006699" runat="server" OnClick="lnkConnectSend_Click"
                                                                                                                CommandArgument='<%#Eval("IDUser")%>'>Connect</asp:LinkButton></span> <span>
                                                                                                                    <input type="hidden" id="hiddenIDConnectionStatus" runat="server" value='<%#Eval("IDConnectionStatus")%>' /></span>
                                                                                                    </div>
                                                                                                </div>
                                                                                                <div style="float: left">
                                                                                                    <img src="images/loading-small.jpg" id="loading" width="18" height="18" style="display: none;
                                                                                                        vertical-align: top" />
                                                                                                </div>
                                                                                                <div style="float: left; padding-left: 5px">
                                                                                                    <span><span id="spnsentMsg" style="color: #7BBC23; font-family: Arial; font-weight: bold;
                                                                                                        font-size: 12px" runat="server"></span><span id="idsuccesstick" runat="server" visible="false"
                                                                                                            style="text-align: left">
                                                                                                            <img src="Images/tick1.jpg" width="14" style="vertical-align: top" height="14" /></span>
                                                                                                        <span id="spanSuccessMsg" runat="server"></span></span>
                                                                                                </div>
                                                                                                <%--
                                                                                                <span id="spnsentMsgTick" runat="server" style="text-align: left; display: none">
                                                                                                    <img src="Images/tick1.jpg" width="14" style="vertical-align: top" height="14" /></span>--%>
                                                                                            </div>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </ItemTemplate>
                                                                            <FooterTemplate>
                                                                                <asp:Label ID="lblVocMember" runat="server" ForeColor="Red" Text="Data Not Found...!!!"
                                                                                    Visible='<%#bool.Parse((dlMyVocationMember.Items.Count==0).ToString())%>'></asp:Label>
                                                                            </FooterTemplate>
                                                                        </asp:DataList>
                                                                    </td>
                                                                    <tr>
                                                                        <td colspan="2" align="center">
                                                                            <span id="spanIdVocMember" style="color: Red; font-size: 13px; display: none; font-weight: bold"
                                                                                runat="server"></span>
                                                                        </td>
                                                                    </tr>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <div>
                                                                            <div style="width: 150px; text-align: left; float: left">
                                                                                <asp:LinkButton ID="lbtnPrev" runat="server" OnClick="lbtnPrev_Click" Font-Size="13px"
                                                                                    ForeColor="#FD403E" Font-Bold="true">Pre</asp:LinkButton>&nbsp;&nbsp;&nbsp;
                                                                                <asp:LinkButton ID="lbtnNext" runat="server" OnClick="lbtnNext_Click" Font-Size="13px"
                                                                                    ForeColor="#FD403E" Font-Bold="true">Next</asp:LinkButton></div>
                                                                            <div style="width: 460px; vertical-align: top; text-align: right; float: left">
                                                                                <asp:Label ID="Label1" runat="server" Text="" ForeColor="#545454" Font-Names="Arial"></asp:Label><br />
                                                                                <asp:Label ID="Label2" runat="server" Text="" ForeColor="#545454" Font-Size="12px"></asp:Label></div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="sidebar">
                                                <div class="head" style="font-size: 16px">
                                                    Topics of My Vocations
                                                </div>
                                                <table>
                                                    <tr>
                                                        <td style="width: 430px">
                                                            <asp:DataList ID="dlVocationTopic" RepeatDirection="Vertical" runat="server">
                                                                <ItemTemplate>
                                                                    <table width="410px" border="0" class="light-border">
                                                                        <tr>
                                                                            <td valign="top">
                                                                                <table width="410px">
                                                                                    <tr>
                                                                                        <td align="left" style="font-size: 15px; color: #000">
                                                                                            <span class="spanTopicHead">Topic Name :</span> <a href="Blog.aspx?topicId=<%#Eval("IDUserTpoic")%> & IsMentor=<%#Eval("IsMentor")%>">
                                                                                                <span class="spanTopicItem" style="padding-left: 5px;">
                                                                                                    <%#Eval("Name")%></span><span style="color: #1C6F93">...</span></a>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" style="font-size: 15px; color: #000">
                                                                                            <span class="spanTopicHead">Description :</span> <span class="spanTopicItem" style="padding-left: 5px;
                                                                                                color: #1C6F93">
                                                                                                <%#Eval("Description")%></span><span style="color: #1C6F93">...</span>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" style="font-size: 15px; color: #000">
                                                                                            <span class="spanTopicHead">Created By :</span> <a href="ViewProfile.aspx?IDUser=<%#Eval("IDUser")%>">
                                                                                                <span class="spanTopicItem" style="padding-left: 5px; color: #1C6F93">
                                                                                                    <%#Eval("Firstname")%>
                                                                                                    <%#Eval("Lastname")%></span></a>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="right" style="font-size: 14px; color: #000">
                                                                                            <span class="spanTopicHead" style="padding: 0px">Posted Date :</span><span class="spanTopicItem"
                                                                                                style="padding-left: 5px; color: #1C6F93"><%#Eval("CreationDate")%></span>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:Label ID="lblTopicVoc" runat="server" ForeColor="Red" Text="Data Not Found...!!!"
                                                                        Visible='<%#bool.Parse((dlVocationTopic.Items.Count==0).ToString())%>'></asp:Label>
                                                                </FooterTemplate>
                                                            </asp:DataList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="center">
                                                            <span id="spanIdTopicVoc" style="color: Red; font-size: 13px; display: none; font-weight: bold"
                                                                runat="server"></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <div style="width: 130px; text-align: left; float: left">
                                                                    <asp:LinkButton ID="lnkPreTopic" runat="server" Font-Size="13px" ForeColor="#FD403E"
                                                                        Font-Bold="true" OnClick="lnkPreTopic_Click">Pre</asp:LinkButton>&nbsp;&nbsp;&nbsp;
                                                                    <asp:LinkButton ID="lnkNextTopic" runat="server" Font-Size="13px" ForeColor="#FD403E"
                                                                        Font-Bold="true" OnClick="lnkNextTopic_Click">Next</asp:LinkButton></div>
                                                                <div style="width: 420px; vertical-align: top; text-align: right; float: left">
                                                                    <asp:Label ID="Label3" runat="server" Text="" ForeColor="#545454" Font-Names="Arial"></asp:Label><br />
                                                                    <asp:Label ID="Label4" runat="server" Text="" ForeColor="#545454" Font-Size="12px"></asp:Label></div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                </table>
            </center>
        </div>
        <div style="clear: both">
        </div>
        <div>
            <uc1:footer runat="server" ID="footer"></uc1:footer>
        </div>
    </center>
    </form>
</body>
</html>
